package entity

import "time"

type Role struct {
	RoleID    int32  `gorm:"primary_key;AUTO_INCREMENT"`
	UserID    int32  `gorm:"unique_index:idx_user_id_server_id"`
	ServerID  int32  `gorm:"unique_index:idx_user_id_server_id"`
	Name      string `gorm:"size:255"`
	Sex       int32  `gorm:"type:smallint"`
	Photo     int32
	Clothing  int32 // 服装
	Level     int32
	VIP       int32 `gorm:"column:vip"`
	Power     int64
	MaxPower  int64 // 历史最高战力
	CreatedAt time.Time
	UpdatedAt time.Time
}

type RoleDeclaration struct {
	RoleID      int32  `gorm:"primary_key;AUTO_INCREMENT"`
	Declaration string `gorm:"size:500"`
	UpdatedAt   time.Time
}

func (RoleDeclaration) TableName() string {
	return "roles"
}
